package com.wang.project.service;

import com.wang.project.model.entity.User;
import com.wang.project.model.file.FileQueryUrlParam;
import com.wang.project.model.file.FileUploadParam;
import org.springframework.web.multipart.MultipartFile;

public interface FileService {
    /**
     * 文件上传
     *
     * @param file
     * @param param
     * @return
     */
    Boolean uploadFile(MultipartFile file, FileUploadParam param, User user) throws Exception;

    /**
     * 获取文件地址
     *
     * @param param
     * @param user
     * @return
     */
    String getObjectURL(FileQueryUrlParam param, User user);

    /**
     * 专门用来获取用户头像地址
     *
     * @param param
     * @param user
     * @return
     */
    String getUserAvatarUrl(FileQueryUrlParam param, User user);


    /**
     * 删除用户头像文件
     *
     * @param fileName
     */
    void removeUserAvatar(String fileName);
}
